using System;
using System.Collections.Generic;
using System.Text;

namespace Developex.DatabaseWrapper
{
	/// <summary>
	/// Foreign object
	/// </summary>
	public interface IForeignObject : IFieldBase
	{
		/// <summary>
		/// Get foreign object
		/// </summary>
		Row GetForeignObject();

		/// <summary>
		/// Is foreign object already created
		/// </summary>
		bool IsForeignObjectCreated { get; }

		/// <summary>
		/// Get prefix for table name for foreign object in select query
		/// </summary>
		/// <returns></returns>
		string GetJoinPrefix();

		/// <summary>
		/// List of fields to load from foreign table
		/// </summary>
		List<IFieldBase> FieldsToLoad { get; }

		/// <summary>
		/// Set custom parameters for Object creation
		/// </summary>
		/// <param name="parameters"></param>
		void SetObjectCreationParameters(params object[] parameters);

		/// <summary>
		/// Add custom parameters for Object creation
		/// </summary>
		/// <param name="parameters"></param>
		void AddObjectCreationParameters(params object[] parameters);

		///<summary>
		/// Is foregn fields presented 
		///</summary>
		/// <remarks>
		/// TODO: check why we need it
		/// </remarks>
		bool IsExist { get; }
	}
}
